Skip to main content

Custom Code Style in Hackmd

· One min read
  • show off
def ah_looooo():
print('hello')
t = 1 + 2
  1. open a css hackmd note like:
<style type="text/css">
/* monokai style */
pre.part{
/* 背景 #282923 */
background-color: #282923;
/* 白普 #f8f8f2 */
color: #f8f8f2;
}

/* 紅關 #f92472 */
.hljs-keyword
{color: #f92472;}

/* 橘參 #fd9622 */
.hljs-params
{color: #fd9622}

/* 黃字 #e7db74 */
.hljs-string
{color: #e7db74}

/* 綠函 #a5e22b */
.hljs-title
{color: #a5e22b;}

/* 紫數 #ac80ff */
.hljs-number
{color: #ac80ff}

/* 註解 #74705d */
.hljs-comment
{color: #74705d;}

/* 藍物 #67d8ef */
</style>
  1. get its url "suffix":

  2. import that note in others like:

{%hackmd kZCWYJkvSImsxd40TxTteQ %}